Package-level declarations

Contains all classes/methods for the Journal feature

Types

Link copied to clipboard
data class JournalUIState(var entryList: List<JournalEntry> = listOf())

UI State for managing the journal entries.

Link copied to clipboard
class JournalViewModel @Inject constructor(journalRepository: JournalRepository) : ViewModel

ViewModel responsible for handling journal entry operations and providing them to the UI.

Functions

Link copied to clipboard
fun EntryItem(item: JournalEntry, onDelete: () -> Unit, onView: () -> Unit)
Link copied to clipboard
fun EntryModificationScreen(modifier: Modifier = Modifier, viewModel: JournalViewModel = hiltViewModel(), id: String? = null, openDrawer: () -> Unit, onNavigateBack: () -> Unit)

Composable for the EntryModification page. It can be used for either creating a new entry or editing an existing one. If no entry ID is provided, the fields will be empty for a new entry. If an ID is provided, the fields will be populated with the data from the existing entry.

Link copied to clipboard
fun EntryViewScreen(modifier: Modifier = Modifier, viewModel: JournalViewModel = hiltViewModel(), id: String? = null, openDrawer: () -> Unit, onNavigateBack: () -> Unit, onNavigateToEntryEdit: (String) -> Unit)

Composable, Displays the entry view screen, where users can see the details of a selected journal entry. It has options to navigate back to the journaling screen or edit the current entry.

Link copied to clipboard
fun JournalingScreen(modifier: Modifier = Modifier, viewModel: JournalViewModel = hiltViewModel(), openDrawer: () -> Unit, onNavigateToEntryCreation: () -> Unit, onNavigateToEntryView: (String) -> Unit)

Displays the home page for the Journaling section, consisting of a top app bar, a floating action button to add a new journal entry, and a list of existing journal entries.